package com.group02.community.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;


import com.group02.community.entity.community.ZyUnit;
import com.group02.community.entity.vo.queryVO.UnitQueryVO;
import com.group02.community.mapper.UnitMapper;
import com.group02.community.service.UnitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UnitServiceImpl extends ServiceImpl<UnitMapper, ZyUnit> implements UnitService {
    @Autowired
    private UnitMapper unitMapper;

    @Override
    public IPage<ZyUnit> getUnitPageList(Integer currentPage, Integer pageSize,String communityId, ZyUnit zyUnit) {



        return unitMapper. getUnitPageList(new Page<>(currentPage,pageSize), communityId ,zyUnit);
    }

    @Override
    public List<String> getElevatorList() {
        return unitMapper.getElevatorList();
    }

    @Override
    public List<ZyUnit> getZyUnitByBuildingId(String buildingId) {
        return unitMapper.getZyUnitByBuildingId(buildingId);
    }


}
